from django.conf.urls.defaults import *

urlpatterns = patterns('exams.views',
  url(r'^card_index$', 'card_index',name='card_index'),
  url(r'^card_index/([0-9]+)/$', 'card_index',name='card_index'),
  url(r'^exam_application$', 'exam_application',name='exam_application'),
  url(r'^exam_application/([0-9]+)/$', 'exam_application',name='exam_application_selected'),
  url(r'^input_exam/(?P<prof>.*)$', 'input_exam', name='input_exam'),
  url(r'^input_exam$', 'input_exam', name='input_exam'),
  url(r'^delete_applications$', 'delete_applications', name='delete_applications'),
  url(r'^delete_applications/([0-9]+)/$', 'delete_applications', name='delete_applications_selected'),
  url(r'^view_exams$', 'view_exams', name='view_exams'),
  url(r'^subject/([0-9]+)/$', 'subject_exam_ajax', name='subject_exam_ajax'),
  url(r'^subject/professor/([0-9a-zA-Z]+)/$', 'subject_profesor_ajax', name='subject_profesor_ajax'),
  url(r'^subject/executor/([0-9a-zA-Z]+)/$', 'subject_executor_ajax', name='subject_executor_ajax'),
  url(r'^subject/rating_type/([0-9a-zA-Z]+)/$', 'subject_rating_type_ajax', name='subject_rating_type_ajax'),
  url(r'^wgrade/$', 'input_wgrade', name='exam_wgrade'),
  url(r'^wgrade/([0-9a-zA-Z]+)/$', 'input_wgrade', name='exam_wgrade'),
  url(r'^wgrade/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'input_wgrade', name='exam_wgrade_selected'),
  url(r'^grade/$', 'input_grade', name='exam_grade'),
  url(r'^grade/([0-9a-zA-Z]+)/$', 'input_grade', name='exam_grade_professor_selected'),
  url(r'^grade/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'input_grade', name='exam_grade_selected'),  
  url(r'^exam_list/$', 'exam_list', name='exam_list'),
  url(r'^exam_list/([0-9a-zA-Z]+)/$', 'exam_list', name='exam_list_professor_selected'),
  url(r'^exam_list/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'exam_list', name='exam_list_selected'),
  url(r'^exam_partial_list/$', 'exam_partial_list', name='exam_partial_list'),
  url(r'^exam_partial_list/([0-9a-zA-Z]+)/$', 'exam_partial_list', name='exam_partial_list_professor_selected'),
  url(r'^exam_partial_list/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'exam_partial_list', name='exam_partial_list_selected'),
  url(r'^exam_final_list/$', 'exam_final_list', name='exam_final_list'),
  url(r'^exam_final_list/([0-9a-zA-Z]+)/$', 'exam_final_list', name='exam_final_list_professor_selected'),
  url(r'^exam_final_list/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'exam_final_list', name='exam_final_list_selected'),
  url(r'^delete_exam$', 'delete_exam', name='delete_exam'),
  url(r'^delete_exam/([0-9a-zA-Z]+)/$', 'delete_exam', name='delete_exam_p'),
  url(r'^delete_exam/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'delete_exam', name='delete_exam_p_e'),
  url(r'^modify_exam$', 'modify_exam', name='modify_exam'),
  url(r'^modify_exam/([0-9a-zA-Z]+)/$', 'modify_exam', name='modify_exam_p'),
  url(r'^modify_exam/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/$', 'modify_exam', name='modify_exam_p_e'),
  
  # List grades
  url(r'^list_grades/$', 'list_grades', name = 'list_grades'),
  url(r'^list_grades/(?P<student>.+)/(?P<subject>.+)/$', 'list_grades', name = 'list_grades'),
  url(r'^list_grades/(?P<student>.+)/$', 'list_grades', name = 'list_grades'),
)
